﻿using System;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.ServiceLocation;
using Microsoft.Practices.Unity;
using Hopscotch.Presentation.Common;
using Hopscotch.Presentation.Common.Utils;
using Hopscotch.Presentation.PartyModule.Constants;
using Hopscotch.Presentation.PartyModule.Views;
using Hopscotch.Common.Contracts.AppService;

namespace Hopscotch.Presentation.PartyModule
{
	public class Module : IModule
	{
		private readonly IAppController shellController;

		public Module(IAppController shellController)
		{
			this.shellController = shellController;
		}

		public void Initialize()
		{
			var container = ServiceLocator.Current.GetInstance<IUnityContainer>();

			var uri = new Uri(IconPaths.Book16);
			shellController.RegisterTool("Account", typeof(AccountView), uri);

			// Register other view objects with DI Container (Unity)
			container.RegisterType<Object, AccountView>(typeof(AccountView).Name);			
			
		}
	}
}
